package dao;

import java.sql.SQLException;
import java.util.List;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import Utils.DataSourceUtils;
import domain.Province;

public class SearchProDao {

	/**
	 * 查找所有的省
	 * @return list
	 * @throws SQLException 
	 */
	public List<Province> findpro() throws SQLException {
		QueryRunner qr=new QueryRunner(DataSourceUtils.getDataSource());
		
		String sql="select * from province ";
		
		return qr.query(sql, new BeanListHandler(Province.class));
	}

}
